package librarymanager

class Book {
    
    static belongsTo = [Author]
    Author author
    Category category    
    String title
    
    static constraints = {
        title(blank: false, nullable: false, size: 3..50)
        category(nullable: false)
    }
    
    String toString() {
        return "${title}"
    }
}
